package com.yanqu.road.server.cmd.banquet.cross;

import com.yanqu.road.pb.banquet.CrossBanquetProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.banquet.CrossBanquetMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_BANQUET_CROSS_SYNC_SYSTEM, desc = "宴会的定时同步")
public class SyncCrossBanquetSystemCmd extends AbstractCommand {

	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		CrossBanquetProto.SyncCrossBanquetMsg reqMsg = CrossBanquetProto.SyncCrossBanquetMsg.parseFrom(packet.getBytes());
		for (CrossBanquetProto.SyncCrossBanquetTemp temp : reqMsg.getBanquetListList()){
			CrossBanquetMgr.syncBanquetSystem(player,temp);
		}
	}

	@Override
	public void sendData(GamePlayer player) {

	}

}
